package pl.edu.agh.io.fx3.utils;

/**
 * Support class for storing information about jdbc driver being used
 * and user's name and password to database
 * 
 * @author Jaroslaw Janik
 */
public class JDBCInfo {

	private String driver;
	private String url;
	private String username;
	private String password;
	
	/**
	 * Constructor which sets JDBC options given by user.
	 * 
	 * @param driver  String which represents jdbc driver.
	 * @param url Url string to database.
	 * @param username User's name which is necessary to connect to database.
	 * @param password User's password which is necessary to connect to database.
	 */
	public JDBCInfo(String driver, String url, String username, String password) {
		this.driver = driver;
		this.url = url;
		this.username = username;
		this.password = password;
	}
	
	/**
	 * Returns string which represents jdbc driver.
	 * 
	 * @return String which represents jdbc driver.
	 */
	public String getDriver() {
		return driver;
	}
	
	/**
	 * Returns user's password in database.
	 * 
	 * @return User's password in database.
	 */
	public String getPassword() {
		return password;
	}
	
	/**
	 * Returns url string to database.
	 * 
	 * @return Url string to database.
	 */
	public String getUrl() {
		return url;
	}
	
	/**
	 * Returns user's name in database
	 * 
	 * @return User's name in database
	 */
	public String getUsername() {
		return username;
	}
	
	/**
	 * Sets string which represents jdbc driver.
	 * 
	 * @param driver String which represents jdbc driver.
	 */
	public void setDriver(String driver) {
		this.driver = driver;
	}
	
	/**
	 * Sets user's password which is necessary to connect to database.
	 * 
	 * @param password User's password which is necessary to connect to database.
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	
	/**
	 * Sets url string to database.
	 * 
	 * @param url Url string to database.
	 */
	public void setUrl(String url) {
		this.url = url;
	}
	
	/**
	 * Set user's name which is necessary to connect to database.
	 * 
	 * @param username User's name which is necessary to connect to database.
	 */
	public void setUsername(String username) {
		this.username = username;
	}
}
